@extends('shared.master')

@section('content')
<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12">
            <ol class="breadcrumb layout-title">
                <li><a href="{{url('project')}}">Task</a></li>
                <li class="active" ><i class="fa fa-user fa-fw"></i> Input</li>
            </ol>
                {{PageData::Error()}}

            <div class="col-lg-6">
                {{ Form::open(array('url' => '#')) }}
                <div class="form-group">
                    {{Form::label('name','Name *')}}
                    {{Form::hidden('id',$Model->getId())}}
                    {{Form::hidden('statusid',$Model->getStatus()!=null ? $Model->getStatus()->getId() : "")}}
                    {{Form::text('name',$Model->getName(),array('class'=>'form-control'))}}
                </div>
                <div class="form-group">
                    {{Form::label('startdate','Start Date *')}}
                    {{Form::text('startdate',$Model->getStartDate(),array('class'=>'form-control hasDatepicker'))}}
                    <script>
                    $('#startdate').datepicker({
                            format: 'mm/dd/yyyy'
                    })
                    </script>
                </div>
                    <div class="form-group">
                    {{Form::label('duedate','Due Date *')}}
                    {{Form::text('duedate',$Model->getDueDate(),array('class'=>'form-control hasDatepicker'))}}
                    <script>
                    $('#duedate').datepicker({
                            format: 'mm/dd/yyyy'
                    })
                    </script>
                </div>
                
                <div class="form-group">
                    {{Form::label('priority','Priority')}}
                    {{Form::select('priority', $PriorityCombo, $Model->getPriority()!=null ? $Model->getPriority()->getId(): "",array('class'=>'form-control'))}}
                </div>
				
                <div class="form-group">
                    {{Form::label('projectid','Project Id')}}
                    {{Form::select('projectid', $ProjectCombo, $Model->getProject()!=null ? $Model->getProject()->getId(): "",array('class'=>'form-control'))}}
                </div>
				
                <div class="form-group">
                    {{Form::label('notes','Notes')}}
                    {{Form::text('notes',$Model->getNotes(),array('class'=>'form-control'))}}
                </div>
				
                <div class="form-group">
                    {{Form::label('createdby','Created By')}}<br>
                    {{$Model->getCreatedBy()!=null ? $Model->getCreatedBy()->getName() : "-"}}
                    {{Form::hidden('createdby',$Model->getCreatedBy()!=null ? $Model->getCreatedBy()->getName() : "-",array('class'=>'form-control'))}}
                </div>
                <div class="form-group">
                    {{Form::label('createdat','Created At')}}<br>
                    {{$Model->getCreatedDate()}}
                    {{Form::hidden('createdat',date("d-m-Y",strtotime($Model->getCreatedDate()!=null ? $Model->getCreatedDate() : date("d-m-Y"))),array('class'=>'form-control hasDatepicker'))}}
                </div>
		
                <p>
                    {{Form::submit('Save',array('class'=>'btn btn-primary',"name"=>"Action"))}}
                    {{Form::button('Close',array('class'=>'btn btn-primary','onClick'=>"location.href='".url('task')."'"))}}
                </p>
                {{ Form::close() }}
            </div>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
</div>
<!-- /.container-fluid -->
    <script>
    
    </script>
@stop